import java.util.*;

public class Small_t{
    public static void main(String[] args, int[] a){
        System.out.print("Enter the Number of Terms: ");
        Scanner c = new Scanner(System.in);
        int n = c.nextInt();
        System.out.println("Enter the Elements: ");
        a = new int[n];
        for(int i = 0; i < n; i++){
            a[i] = c.nextInt();
        }
        System.out.print("You Entered: ");
        int sm = a[0];
        for(int i = 0; i < n; i++){
            System.out.print(a[i] + " ");
            if(sm > a[i]){
                sm = a[i];
            }
        }
        System.out.println("\nSmallest Element: " + sm);
    }
}